package com.myapplication.ui.homefragment.shopfragment;

import com.myapplication.base.IModel;
import com.myapplication.base.IPresenter;
import com.myapplication.base.Iview;
import com.myapplication.bean.Banner;
import com.myapplication.bean.Shop;

import java.util.List;
import java.util.Map;

import retrofit2.Callback;

/**
 * Created by zitaojiang on 2016/10/6.
 */
public class Contract_Shop {

 public interface  view extends  Iview{
     //访问网络数据成功
     void onGetBannerSuccess(List<Banner.AdListBean> bannerbean);
     //访问网络数据失败
     void onGetBannerFail(String error);

     //访问网络数据成功
     void onGetDataSuccess(List<Shop.RowsBean> rowsBeen);
     //访问网络数据失败
     void onGetDataFail(String error);
 }
    public  interface  Model extends IModel{

        //传入参数，获得数据
        void getBanner(Callback<Banner> callback);
        //传入参数，获得数据
        void getData(Map<String,String> params, Callback<Shop> callback);
    }

    public interface Presenter extends IPresenter{

        void  putData();

        //将params传入到presenter中去，因为View与Model交互，所以只能
        //传给Presenter，然后再调用上面的那个方法，将params传入到上面的方法中去
        void  putData(Map<String,String> params);
        }
}
